home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 65.zip
/
BS1 part 65
/
Math Visin v2.1 disk 2.adf
/
Arexx.CLI
/
Change1.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-02-14
|
3KB
|
74 lines
/* CHANGE1.REXX, an ARexx program for MathVision, 3-Sep-89 dh
This generic Arexx program will allow you to create a series of pictures
in contour plot mode while changing one numeric parameter. It is assumed
that you have already entered the appropriate colors and setting in
Doug's Math Aquarium.
To use this program, you must edit this file, and put in the appropriate
values in the User Settings section which follows.
The 'BaseFilename' is the basic name which will be used for all the pictures.
For example, if you put "PLOTS:PIC", the files will be named "PLOTS:PIC0000",
"PLOTS:PIC0001", "PLOTS:PIC0002", and so on. The number of the picture is
appended to the basic file name.
'Pictures' is how many frames you want in this zoom. A higher setting
here will give you smoother animation. The pictures will be numbered starting
at 0 and going up to Pictures-1.
It is up to you to actually use the parameter in the program to vary what
you want to vary. Put your code in the spot marked USE PARAMETER HERE.
The variable 'P' is set with the value of the parameter, if you wish to
use it.
*/
/*============================== User Settings =============================*/
Pictures = 5 /* Number of pictures to plot */
StartPicture = 0 /* Picture to resume animation at */
BaseFilename = "RAM:T/Pic" /* Basic pathname for pictures */
Record = 0 /* 0 = dry run, 1 = record to disk */
ParameterStart = 0 /* start and end values for the parameter */
ParameterEnd = 1
/*==========================================================================*/
ADDRESS "MathVision"
OPTIONS RESULTS /* We need answers */
SIGNAL ON ERROR /* go to error handler */
NUMERIC DIGITS 15 /* for small things */
StopSign "F"
DO PictureNumber = StartPicture TO Pictures-1 /* for each picture...*/
Filename = BaseFilename||Right(PictureNumber,4,"0") /* status report */
SAY "Plotting: "Filename
mult = (PictureNumber) / (Pictures-1) /* 0..1 */
parameter = ParameterStart + mult*(ParameterEnd - ParameterStart)
p parameter /* set the variable P */
/*======================= USE PARAMETER HERE IF NEEDED ================ */
/*===================================================================== */
PlotContour /* do the appropriate plot */
Get StopSign /* did user hit Ctrl-C ? */
IF RESULT = "T" THEN BREAK
PathName Filename /* set the name for this file */
IF (Record) THEN SavePicture /* save it to disk */
Get StopSign /* did user hit Ctrl-C ? */
IF RESULT = "T" THEN BREAK
END /* do */
EXIT
ERROR: /* Error Diagnostic for return codes */
Get Diagnosis RC
SAY RESULT" on line "SIGL
EXIT